import classes from './UserContent.module.css'
import {useEffect, useRef} from "react";

function UserContent(props){
    const {avatar,username} = props
    const myRef = useRef();
    useEffect(() => {
        myRef.current.innerHTML = avatar;
    })

    return(
        <li className={classes.li}>
            <div className={classes.img} ref={myRef}>
            </div>
            <span>{username}</span>
        </li>
    )
}
export default UserContent;